package cell

import "github.com/treelab/updatecolumn/models"

const cellTypeValuePropertyMap = map[int32]string{
		0:  "Text",
		1:  "LongText",
		2:  "DateTime",
		3:  "RecordReference",
		4:  "Currency",
		5:  "Number",
		6:  "CheckBox",
		7:  "MultSelect",
		8:  "Select",
		9:  "Formula",
		10: "MultiAttachments",
		11: "LookUp",
		12: "RollUp",
		13: "UniqueID",
		14: "Rating",
		15: "Phone",
		16: "Email",
		17: "Collaborator",
	}


  func getCellValuePropertyName(instanceType int32) string {
    return cellTypeValuePropertyMap[instanceType] || "text"
  }

  //#region cell value convert
 func cellValueToString(c models.ColumnAndCell, target string) string{
    return ""
  }

func cellValueToNumber(c models.ColumnAndCell) int32 {
    return 0;
  }
func   cellValueToDatetime(c models.ColumnAndCell) string {
    return ""
  }
func   cellValueToCheckbox(c models.ColumnAndCell) bool {
    return false;
  }
func  cellValueToSelect(c models.ColumnAndCell) models.ColumnOption {

  return models.ColumnOption{}

  }
func  cellValueToMultiSelect(c models.ColumnAndCell) [] models.ColumnOption {

  return nil

  }
func  cellValueToRating(c models.ColumnAndCell) {

  }
func     cellValueToCollaborator(c models.ColumnAndCell) []string {
    return nil
  }
  //#endregion
 func    upsertCell() {

  }

  func    updateReferenceColumnAndDependencies() {

  }

  func    addCellUpdateEvent() {
    // const cellId = cell.uid ?? this.getNodeTempId(cell);
    // const { workspaceId, coreId, tableId, action, _metadata } = command!;
    // o!.events.addEvents(
    //   new CellUpdated(workspaceId, coreId, tableId, cell.columnId, cell.rowId, cellId, action, _metadata),
    //   replaceId,
    // );
  }

  func getNodeId(id  string) string {

    return id[0:2]
  //  return id.substr(0, 2) == "_:" ? id : `<${id}>`;
  }

  func getNodeTempId(node string)  string{
    return node.uid
  }

  func needEmptyCell() bool {
    return true
  }


  func getSelectedOption( o models.ColumnAndCell) {

  }

  func getVisibleTextByCell(cell models.Cell, column models.Column) {

  }


  func updateDependentFormulaCell() {

  }

  func getRowFromDependentColumn() {

  }

  func getColumnCellMappingByRow() {

  }

  func updateReferenceCell() {

  }

  func notifyCollaborator(collaborator AddUserToCollaboratorColumn) {
   // this.notificationService.collaboratorMentionedInRecord(collaborator);
  }

  // findCollaboratorGroup
  func findCollaboratorGroupAndUser() {

  }

  func getCollaboratorUserNames() {

  }

  func updateColumnConfig() {

  }

